<script id="add-selector-tpl" type="application/template">
    <div id="selector-add-area">
        <form id="add-selector-form" class="form-horizontal">
            <div class="form-group">
                <label for="input-name" class="col-sm-1 control-label">名称</label>
                <div class="col-sm-11">
                    <input type="text" class="form-control" id="selector-name" placeholder="名称">
                </div>
            </div><!-- name -->

            <div class="form-group">
                <label for="input-name" class="col-sm-1 control-label">类型</label>
                <div class="col-sm-3">
                    <select class="form-control" id="selector-type">
                        <option value="0">全流量</option>
                        <option value="1">自定义流量</option>
                    </select>
                </div>
            </div><!-- type -->

            <!-- add - 选择器-条件编辑器模板 start -->
            <div id="judge-area" style="display: none;">
                <div class="form-group">
                    <label for="input-judge-type" class="col-sm-1 control-label">规则</label>
                    <div class="col-sm-3">
                        <select class="form-control" id="rule-judge-type">
                            <option value="0">单一条件匹配</option>
                            <option value="1">and匹配</option>
                            <option value="2">or匹配</option>
                            <option value="3">复杂匹配</option>
                        </select>
                    </div>

                    <div class="col-sm-8" id="expression-area" style="display:none;">
                         <input type="text" class="form-control" id="rule-judge-expression" placeholder="规则表达式，示例: (v[1] or v[2]) and v[3]">
                    </div>
                </div><!-- 类型 -->

                {(common/selector-judge-condition-part.html)}<!-- 条件编辑共用部分 -->
            </div>
            <!-- add - 选择器-条件编辑器模板 end -->

            <div class="form-group">
                <label class="col-sm-1 control-label">处理</label>
                <div class="col-sm-3">
                    <select class="form-control" id="selector-continue">
                        <option value="true">继续后续选择器</option>
                        <option value="false">略过后续选择器</option>
                    </select>
                </div>
                <div class="col-sm-3" style="padding-left:0;">
                    <select class="form-control" id="selector-log">
                        <option value="false" selected>不记录日志</option>
                        <option value="true">记录日志</option>
                    </select>
                </div>
            </div><!-- handle log-->

            <div class="form-group">
                <div class="col-sm-offset-1 col-sm-11">
                    <div class="checkbox">
                        <label>
                            <input type="checkbox" id="selector-enable"> 启用
                        </label>
                    </div>
                </div>
            </div>
        </form>
    </div>
</script>
